home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
ht_tportnew.h.z
/
ht_tportnew.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
5KB
|
225 lines
/**************************************************************************
* *
* Copyright (C) 1988, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/*
** colors for the textport
*/
#define LT_GRAY_R 200
#define LT_GRAY_G 200
#define LT_GRAY_B 200
#define MD_GRAY_R 112
#define MD_GRAY_G 112
#define MD_GRAY_B 128
#define SLATE_R 96
#define SLATE_G 96
#define SLATE_B 112
#define RASPBERRY_R 160
#define RASPBERRY_G 0
#define RASPBERRY_B 140
#define NEWS_ROOT_R 127
#define NEWS_ROOT_G 158
#define NEWS_ROOT_B 191
#define LT_BLUE_R 64
#define LT_BLUE_G 64
#define LT_BLUE_B 192
/*
** color indices
*/
#define SCR_IDX 8
#define TP_IDX 9
#define PNL_IDX 10
#define LOG_IDX 11
#define LOGO_START 16
#define BORDER_COLOR WHITE
#define INR_BORDER LOGO_START
#define CURSOR_COLOR GREEN
#define PNL_DF_R SLATE_R
#define PNL_DF_G SLATE_G
#define PNL_DF_B SLATE_B
#define TP_DF_R SLATE_R
#define TP_DF_G SLATE_G
#define TP_DF_B SLATE_B
#define LOGO_DF_R LT_BLUE_R
#define LOGO_DF_G LT_BLUE_G
#define LOGO_DF_B LT_BLUE_B
#define SCR_DF_R NEWS_ROOT_R
#define SCR_DF_G NEWS_ROOT_G
#define SCR_DF_B NEWS_ROOT_B
/*
** sizes for the GR1 textport in its various modes
*/
#define TP_MAXROWS 40
#define TP_MAXCOLS 80
#define LOG_MAXROWS TP_MAXROWS
#define PNL_MAXROWS 20
#define PNL_MAXCOLS 80
/*
** ioctls for the host-implemented textport
*/
#define HCTPCODE(c) ('G'<<8|(c))
/*
** textport modes-- basic textport "TP", boot panel "PNL", and login panel "LOG"
*/
#define TP_MODE HCTPCODE(2)
#define PNL_MODE HCTPCODE(3)
#define LOG_MODE HCTPCODE(4)
#define AUTO_INIT HCTPCODE(5)
/*
** graphical characters recognized in the BOOT PANEL mode
*/
#define L_BRAK ((char ) 1)
#define U_BAR ((char ) 2)
#define O_BAR ((char ) 5)
#define R_BRAK ((char ) 6)
#define CLR_HOME ((char ) 14)
/* The following macros are used by the text port emulator */
#define IRIS10I_HT 16
#define IRIS10I_DC 4
#define fontWidth 9
#define TPFONTHT IRIS10I_HT
#define BOX_HT 20
#define BOX_DC 6
#define XBORDER 2
#define YBORDER 2
#define XSIZE(cols) ((cols) * fontWidth)
/*
** special graphics attributes and characters
*/
#define AT_UL (1<<8)
#define AT_RV (2<<8)
#define AT_BX (4<<8)
#define IS_UL(c) ((c) & AT_UL)
#define IS_RV(c) ((c) & AT_RV)
#define IS_BX(c) ((c) & AT_BX)
#define IS_PRINTABLE(c) (((c)>=' ') &&((c)<='\376'))
#define MAXAPARAMS 4
/* states */
#define CLEAN 0
#define SCROLLED 1
#define DIRTY 2
/* astates */
#define NORM 0
#define ESC 1
#define CSI 2
/* flags */
#define CURSOFF 1
/* Counter used for screen saver */
#define TP_TIMEOUT (15*60*60)
/*
** structure of textport
*/
typedef struct row {
char maxcol; /* last used column */
char dirty; /* non-zero if row needs painting */
unsigned short data[TP_MAXCOLS];/* txport presumed larger than panel */
} row_t;
typedef struct textport {
char state; /* see below */
char astate; /* see below */
short llx, lly; /* coordinates of lower window corner */
short numrows; /* number of rows displayed */
short numcols; /* number of columns displayed */
short crow, ccol; /* cursor row & column */
short aparams[MAXAPARAMS];
short aparamc;
short aflags;
unsigned short attribs;
row_t *row[TP_MAXROWS];
row_t rowd[TP_MAXROWS]; /* textport presumed bigger than panel */
} textport_t;
typedef struct tportstate {
int init_on_write;
int hints_inited;
int tx_is_okay;
int xScreenSize, yScreenSize;
int tx_showlogo;
int LOGO_X, LOGO_Y;
int fontDescender;
int fontHeight;
int boot_panel_mode;
int fgnd;
int bgnd;
int page_r, page_g, page_b;
textport_t textport;
void *hwbase;
int blank_ctr;
} tportstate_t;
/*
** procedural interface to the textport
*/
extern int keyboard_init();
extern void ht_txPrint();
extern void ht_txInit();
extern void ht_txConfig();
extern void ht_tx_set_ok();
extern void ht_tx_not_ok();
extern void ht_gfx_set_ok();
extern void ht_gfx_not_ok();
extern void ht_txScreenOn();
extern int ht_tx_ok();
extern int ht_gfx_ok();
extern int ht_txGfxInit();
/* text port functions */
struct tp_fncs {
void (*blankscreen)();
void (*color)();
void (*mapcolor)();
void (*sboxfi)();
void (*pnt2i)();
void (*cmov2i)();
void (*drawbitmap)();
void (*hwinit)();
};
extern struct tp_fncs *tp_fncs;
extern tportstate_t tp_bdata;